<script type="text/javascript">
    google.load('search', '1');

    function OnLoad()
    {
        // Create a search control
        var searchControl = new google.search.SearchControl();

        // Add in a WebSearch
        var webSearch = new google.search.WebSearch();

        // Restrict the search to pages from Genapha
        webSearch.setUserDefinedLabel("YOUR SITE TITLE HERE");
        webSearch.setSiteRestriction('YOUR SITE HERE.com');

        // Display 'more' results
        options = new google.search.SearcherOptions();
        options.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN);

        // Add the searcher to the SearchControl
        searchControl.addSearcher(webSearch, options);

        // Tell the searcher to draw itself and tell it where to attach
        searchControl.draw(document.getElementById("results"));

        // Execute an inital search
        query = window.location.search.substr(8); // Get query string without '?search='
        searchControl.execute(query);
    }

    google.setOnLoadCallback(OnLoad);

    $(document).ready(function() {
        $("#results :submit").live("click", function() {
            url = "./siteSearch.do?search=" + $(this).parent().prev().children(":text").val();
            window.location = url;
        });
    });
</script>
<div id="ajaxSearchResults" class="menulessContent">
    <h2>Site Search</h2>
    <div id="results"></div>
</div>